-
Notifications
You must be signed in to change notification settings - Fork 25
FEAT: Complex Datatype support-XML #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive support for the SQL Server XML data type to the Python MSSQL driver. The implementation includes proper handling for XML data binding, fetching, streaming, and batching operations.
- Added SQL_SS_XML data type support throughout the driver core
- Updated LOB handling logic to treat XML columns as streamable large objects
- Created comprehensive test suite covering XML operations and edge cases
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
mssql_python/pybind/ddbc_bindings.cpp | Added XML data type constant and integrated XML handling into column binding, fetching, and streaming operations |
tests/test_004_cursor.py | Added comprehensive test suite for XML functionality including basic operations, edge cases, and error handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.connection.connection.cpp: 68.3%
mssql_python.ddbc_bindings.py: 68.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.5%
mssql_python.cursor.py: 79.7%
mssql_python.connection.py: 81.7%
mssql_python.helpers.py: 84.7%
mssql_python.auth.py: 85.3%
mssql_python.type.py: 86.8%
mssql_python.pooling.py: 87.5%
mssql_python.exceptions.py: 90.4% 🔗 Quick Links
|
9eda1de
to
a86a2aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in line with sumit's comment - needs some documentation only, approving from my end
Work Item / Issue Reference
Summary
This pull request adds comprehensive support for the SQL Server
XML
data type to the Python MSSQL driver, ensuring proper handling for insertion, retrieval, batching, and streaming of XML data. It also introduces a suite of tests to verify correct XML behavior, including edge cases like empty, large, and malformed XML values.MSSQL Driver Enhancements
SQL_SS_XML
data type throughout the driver, including binding, fetching, and row size calculations, so that XML columns are handled correctly during data operations. [1] [2] [3] [4] [5]FetchMany_wrap
andFetchAll_wrap
to treat XML columns as LOBs, enabling efficient streaming for large XML values. [1] [2]Test Coverage for XML Support
tests/test_004_cursor.py
to verify XML handling, including basic insert/fetch, empty/null values, large XML streaming, batch inserts, and error handling for malformed XML input.